<?php
if($hover==1){
$search_url="/supply/search.php";
$search_back1=" style='background:url(/images/1.gif) no-repeat;margin-left:5px;'";
}
if($hover==2){
$search_url="/supply/search.php";
$search_back1=" style='background:url(/images/1.gif) no-repeat;margin-left:5px;'";
}
if($hover==3){
$search_url="/buy/search.php";
$search_back3=" style='background:url(/images/1.gif) no-repeat;margin-left:5px;'";
}
if($hover==4){
$search_url="/company/search.php";
$search_back4=" style='background:url(/images/1.gif) no-repeat;margin-left:5px;'";
}
?>
<div class="top1">
<div style="float:left;width:388px;"><a href="/"><img src="/images/logo.gif" alt="三帝贸易网" border="0"/></a></div>
<form method="get" action="<?=$search_url?>" onsubmit="return prosearch()"><div class="searchM">
<div id="search_1">
<ul>
<li <?=$search_back1?>><a href="/supply" class="link_3">产品</a></li>
<li <?=$search_back3?>><a href="/buy" class="link_2">求购</a></li>
<li <?=$search_back4?>><a href="/company" class="link_2">公司</a></li>
</ul>
</div>
<div id="search_2">
<ul>
<li style="padding-top:6px;width:338px;">
<input type="text" style="width:320px;border:0px;height:20px;line-height:22px;color:#666;font-size:14px;" name="subject" id="subject" />
</li>
<li style="padding-top:3px;"><input type="image" src="/images/3.gif" /></li>
</ul>  
</div>
</div>
</form>
</div>
<script language="javascript">
function $(id){
return document.getElementById(id);
}
function prosearch(){
if($("subject").value==""){
alert("请输入产品名称");
$("subject").focus();
return false;
}
}

</script>